<!-- 盒子尺寸调整 -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子尺寸调整</title>
    <style>
        /* 目标：设置有20px宽内边距，200*200大小的盒子 */
        .divHand {
            width: 160px;
            height: 160px;

            background-color: skyblue;
            padding: 20px;
        }

        .divAuto {
            width: 200px;
            height: 200px;
            background-color: skyblue;

            /* 内减模式 */
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <div class="divHand">盒子尺寸调整-手动</div>
    <br>
    <div class="divAuto">盒子尺寸调整-内减模式</div>
</body>
</html>